import request from '@/utils/request'

// 查询图片视频资源列表
export function listPubvideo(query) {
  return request({
    url: '/store/pubvideo/list',
    method: 'get',
    params: query
  })
}

// 查询图片视频资源详细
export function getPubvideo(pubId) {
  return request({
    url: '/store/pubvideo/' + pubId,
    method: 'get'
  })
}

// 新增图片视频资源
export function addPubvideo(data) {
  return request({
    url: '/store/pubvideo',
    method: 'post',
    data: data
  })
}

// 修改图片视频资源
export function updatePubvideo(data) {
  return request({
    url: '/store/pubvideo',
    method: 'put',
    data: data
  })
}

// 删除图片视频资源
export function delPubvideo(pubId) {
  return request({
    url: '/store/pubvideo/' + pubId,
    method: 'delete'
  })
}

// 用户状态修改
export function changeVideoUrlFlag(userId, urlFlag) {
  const data = {
    userId,
    status
  }
  return request({
    url: '/store/pubvideo/urlFlag',
    method: 'put',
    data: data
  })
}
